package po.car;

import java.time.LocalDateTime;
import java.util.Objects;

import po.emp.Empoyee;

/**
 * 汽车使用记录
 * @author admin
 *
 */
public class UseCarRecord {
	private int useId;
	private Car car;
	private LocalDateTime useStartTime;  //使用开始时间
	private LocalDateTime useEndTime;  //使用结束时间
	private Empoyee useEmp;   //使用负责人
	public UseCarRecord() {
		super();
	}
	public UseCarRecord(int useId, Car car, LocalDateTime useStartTime, LocalDateTime useEndTime, Empoyee useEmp) {
		super();
		this.useId = useId;
		this.car = car;
		this.useStartTime = useStartTime;
		this.useEndTime = useEndTime;
		this.useEmp = useEmp;
	}
	public int getUseId() {
		return useId;
	}
	public void setUseId(int useId) {
		this.useId = useId;
	}
	public Car getCar() {
		return car;
	}
	public void setCar(Car car) {
		this.car = car;
	}
	public LocalDateTime getUseStartTime() {
		return useStartTime;
	}
	public void setUseStartTime(LocalDateTime useStartTime) {
		this.useStartTime = useStartTime;
	}
	public LocalDateTime getUseEndTime() {
		return useEndTime;
	}
	public void setUseEndTime(LocalDateTime useEndTime) {
		this.useEndTime = useEndTime;
	}
	public Empoyee getUseEmp() {
		return useEmp;
	}
	public void setUseEmp(Empoyee useEmp) {
		this.useEmp = useEmp;
	}
	@Override
	public String toString() {
		return "UseCarRecord [useId=" + useId + ", car=" + car + ", useStartTime=" + useStartTime + ", useEndTime="
				+ useEndTime + ", useEmp=" + useEmp + "]";
	}
	@Override
	public int hashCode() {
		return Objects.hash(useId);
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UseCarRecord other = (UseCarRecord) obj;
		return useId == other.useId;
	}
}


